package com.muyu.user.service.impl;

import java.util.List;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.muyu.common.core.web.page.PageQueryModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.user.mapper.SysUserBalanceMapper;
import com.muyu.user.domain.SysUserBalance;
import com.muyu.user.domain.model.SysUserBalanceQueryModel;
import com.muyu.user.domain.model.SysUserBalancePageQueryModel;
import com.muyu.user.service.SysUserBalanceService;

/**
 * 余额变动Service业务层处理
 *
 * @author liuguoqiang
 * @date 2025-09-18
 */
@Slf4j
@Service
public class SysUserBalanceServiceImpl extends ServiceImpl<SysUserBalanceMapper, SysUserBalance>  implements SysUserBalanceService {

    /**
     * 查询余额变动列表
     *
     * @param pageQueryModel 余额变动
     * @return 余额变动
     */
    @Override
    public PageQueryModel<SysUserBalancePageQueryModel> pageQuery(SysUserBalanceQueryModel pageQueryModel) {
        LambdaQueryWrapper<SysUserBalance> queryWrapper = new LambdaQueryWrapper<>();
           Page<SysUserBalance> page = this.page(pageQueryModel.buildPage(), queryWrapper);
        return PageQueryModel.of(page).cover(SysUserBalancePageQueryModel::infoBuild);
    }

}
